/**
@file EasyObjectPool.cpp

@brief 

@details
Copyright (c) 1998 - 2012 Tencent. All Rights Reserved.

@author		admin(admin@tencent.com)
@version	1.0
@date		2012/09/18

history:
<PRE>
History ID	:	1
Author    	:	admin(admin@tencent.com)
DateTime	:	2012/09/18
Description :	Create
</PRE>
*/

// STANDARD INCLUDES
// SYSTEM INCLUDES
// APPLICATION INCLUDES
#include "EasyObjectPool.h"
// USING NAMESPACES
// DEFINES
// MACROS
// EXTERNAL FUNCTIONS
// EXTERNAL VARIABLES
// CONSTANTS
// STRUCTS
// TYPEDEFS
// FORWARD DECLARATIONS


//CEasyObjectPool<_T, _MUTEX, _CAPACITY>::CEasyObjectPool()
//{
//	m_head = m_tail = 0;
//}
//
//CEasyObjectPool<class _T, class _MUTEX, int _CAPACITY>::~CEasyObjectPool()
//{
//
//}
//
//bool CEasyObjectPool<class _T, class _MUTEX, int _CAPACITY>::init()
//{
//	memset(m_pool, 0, sizeof(m_pool));
//	return true;
//}
//
//bool CEasyObjectPool<class _T, class _MUTEX, int _CAPACITY>::add(_T& _t)
//{
//	_MUTEX mutex;
//	mutex.Lock();
//	if ((m_tail + 1)%_CAPACITY == m_head)
//	{
//		return false;
//	}
//	m_pool[m_tail] = _t;
//	m_tail = (m_tail+1)%_CAPACITY;
//	mutex.Unlock();
//}
//
//template<class _T, class _MUTEX, int _CAPACITY=1024>
//bool CEasyObjectPool::pop(_T& _t)
//{
//	_MUTEX mutex;
//	mutex.Lock();
//	if (m_tail == m_head)
//	{
//		return false;
//	}
//	_t = m_pool[m_head];
//	m_head = (m_head+1)%_CAPACITY;
//	mutex.Unlock();
//}
//
//
